package com.chidopi.market.bookstore.domain;

public class City2Category {
	
    private Integer id;
    private Integer city_id;
    private Integer category_id;
    private String categoryName;
    private String enable_flag;
    private Integer parent_id; // category_id
    private String parent_name;
    private Integer level;
    
    public City2Category(){
    	
    }
    
    public City2Category(String [] values){
    	category_id = Integer.parseInt(values[0]);
    	if(values[1] != null && values[1].trim().length() > 0)
    		parent_id = Integer.parseInt(values[1]);
    	level = Integer.parseInt(values[2]);
    	enable_flag = values[3];
    }
    
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getCity_id() {
		return city_id;
	}
	public void setCity_id(Integer city_id) {
		this.city_id = city_id;
	}
	public Integer getCategory_id() {
		return category_id;
	}
	public void setCategory_id(Integer category_id) {
		this.category_id = category_id;
	}
	public String getCategoryName() {
		return categoryName;
	}
	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}
	public String getEnable_flag() {
		return enable_flag;
	}
	public void setEnable_flag(String enable_flag) {
		this.enable_flag = enable_flag;
	}
	public Integer getParent_id() {
		return parent_id;
	}
	public void setParent_id(Integer parent_id) {
		this.parent_id = parent_id;
	}
	public String getParent_name() {
		return parent_name;
	}
	public void setParent_name(String parent_name) {
		this.parent_name = parent_name;
	}
	public Integer getLevel() {
		return level;
	}
	public void setLevel(Integer level) {
		this.level = level;
	}
    
	@Override
	public String toString() {
		System.out.println(" toString =" +category_id + ";" + (parent_id == null ? "" : parent_id) + ";" + level + ";" + enable_flag);
		return  category_id + ";" + (parent_id == null ? "" : parent_id) + ";" + level + ";" + enable_flag;
	}
}
